<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <meta charset="utf-8"/>
    <title>    TFC-Trotri Foundation Classes &raquo; \tfc\ap\HttpSession
</title>
    <meta name="author" content=""/>
    <meta name="description" content=""/>

            <link href="../css/template.css" rel="stylesheet" media="all"/>
    
            <!--[if lt IE 9]>
        
        <![endif]-->
        <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
        <script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
        <script src="../js/bootstrap.js" type="text/javascript"></script>
        <script src="../js/template.js" type="text/javascript"></script>
        <script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
    
            <link rel="shortcut icon" href="../img/favicon.ico"/>
        <link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
        <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
        <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
    </head>
<body>

        <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span> <span class="icon-bar"></span>
                    <span class="icon-bar"></span> </a>
                <a class="brand" href="http://www.trotri.com/">Trotri官网</a><a class="brand" href="../index.html">TFC-Trotri Foundation Classes</a>

                <div class="nav-collapse">
                    <ul class="nav">
                        <li class="dropdown">
                            <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
                                API Documentation <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                                                    <li><a>Namespaces</a></li>
                                                                        <li><a href="../namespaces/tfc.html">tfc</a></li>
                                                                                                                                </ul>
                        </li>
                        <li class="dropdown" id="charts-menu">
                            <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
                                Charts <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="../graph_class.html">
                                        <i class="icon-list-alt"></i>&#160;Class hierarchy diagram
                                    </a>
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown" id="reports-menu">
                            <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
                                Reports <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="../errors.html">
                                         
                                    </a>
                                </li>
                                <li>
                                    <a href="../markers.html">
                                        <i class="icon-list-alt"></i>&#160;Markers
                                    </a>
                                </li>
                                <li>
                                    <a href="../deprecated.html">
                                        <i class="icon-list-alt"></i>&#160;Deprecated
                                    </a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="go_to_top">
            <a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>
        </div>
    </div>
    
    <div id="___" class="container">
        <noscript>
            <div class="alert alert-warning">
                Javascript is disabled; several features are only available if Javascript is enabled.
            </div>
        </noscript>

        
            <style>
        .deprecated h2 {
            text-decoration: line-through;
        }
    </style>
    <div class="row">
        <div class="span4">
                    <div class="btn-group view pull-right" data-toggle="buttons-radio">
        <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
        <button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
    </div>
    <div class="btn-group visibility" data-toggle="buttons-checkbox">
        <button class="btn public active" title="Show public elements">Public</button>
        <button class="btn protected" title="Show protected elements">Protected</button>
        <button class="btn private" title="Show private elements">Private</button>
        <button class="btn inherited active" title="Show inherited elements">Inherited</button>
    </div>

        <ul class="side-nav nav nav-list">
        <li class="nav-header">
            <i class="icon-custom icon-method"></i> Methods
            <ul>
                                                                                                    <li class="method public">
        <a href="#method___construct" title="__construct :: 构造方法：初始化用户自定义会话处理接口">
            <span class="description">构造方法：初始化用户自定义会话处理接口</span><pre>__construct</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_open" title="open :: 打开会话任务">
            <span class="description">打开会话任务</span><pre>open</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_close" title="close :: 关闭会话任务">
            <span class="description">关闭会话任务</span><pre>close</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_destroy" title="destroy :: 销毁所有的会话">
            <span class="description">销毁所有的会话</span><pre>destroy</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getIsStarted" title="getIsStarted :: 判断会话是否已经被打开">
            <span class="description">判断会话是否已经被打开</span><pre>getIsStarted</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getId" title="getId :: 获取会话ID">
            <span class="description">获取会话ID</span><pre>getId</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_setId" title="setId :: 设置会话ID">
            <span class="description">设置会话ID</span><pre>setId</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_regenerateID" title="regenerateID :: 重置会话ID">
            <span class="description">重置会话ID</span><pre>regenerateID</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getName" title="getName :: 获取会话名">
            <span class="description">获取会话名</span><pre>getName</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_setName" title="setName :: 设置会话名">
            <span class="description">设置会话名</span><pre>setName</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getSavePath" title="getSavePath :: 获取会话保存路径">
            <span class="description">获取会话保存路径</span><pre>getSavePath</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_setSavePath" title="setSavePath :: 设置会话保存路径">
            <span class="description">设置会话保存路径</span><pre>setSavePath</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getAutoStart" title="getAutoStart :: 判断Session是否会自动开启">
            <span class="description">判断Session是否会自动开启</span><pre>getAutoStart</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_toArray" title="toArray :: 获取所有的会话">
            <span class="description">获取所有的会话</span><pre>toArray</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_count" title="count :: 获取会话数据量">
            <span class="description">获取会话数据量</span><pre>count</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getKeys" title="getKeys :: 获取会话中所有的键">
            <span class="description">获取会话中所有的键</span><pre>getKeys</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_get" title="get :: 通过会话键获取值，如果都找不到，返回默认值">
            <span class="description">通过会话键获取值，如果都找不到，返回默认值</span><pre>get</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_add" title="add :: 添加会话，如果键已经存在，替换老值">
            <span class="description">添加会话，如果键已经存在，替换老值</span><pre>add</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_remove" title="remove :: 移除会话">
            <span class="description">移除会话</span><pre>remove</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_clear" title="clear :: 移除所有的会话">
            <span class="description">移除所有的会话</span><pre>clear</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_has" title="has :: 判断键在会话中是否存在">
            <span class="description">判断键在会话中是否存在</span><pre>has</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getTimeout" title="getTimeout :: 获取PHP INI中设置的SESSION过期时间，默认：1440s">
            <span class="description">获取PHP INI中设置的SESSION过期时间，默认：1440s</span><pre>getTimeout</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_setTimeout" title="setTimeout :: 设置PHP INI中的SESSION过期时间，默认：1440s">
            <span class="description">设置PHP INI中的SESSION过期时间，默认：1440s</span><pre>setTimeout</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_registerSaveHandler" title="registerSaveHandler :: 设置用户自定义会话处理接口">
            <span class="description">设置用户自定义会话处理接口</span><pre>registerSaveHandler</pre>
        </a>
    </li>

                                                </ul>
        </li>
        <li class="nav-header protected">» Protected
            <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </ul>
        </li>
        <li class="nav-header private">» Private
            <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </ul>
        </li>
        <li class="nav-header">
            <i class="icon-custom icon-constant"></i> Constants
            <ul>
                            </ul>
        </li>
    </ul>


        </div>

        <div class="span8">
            <div class="element class">
                <h1>HttpSession</h1>
                <small style="display: block; text-align: right">
                                                        </small>
                <p class="short_description">HttpSession class file
HTTP会话管理类</p>
                <div class="details">
                    <div class="long_description">
                        
                    </div>
                    <table class="table table-bordered">
                                                                                    <tr>
                                    <th>
                                        author
                                                                            </th>
                                    <td>
                                                                                    
                                                                                <p>宋欢 <a href="mailto:trotri@yeah.net">trotri@yeah.net</a></p>
                                    </td>
                                </tr>
                                                                                                                <tr>
                                    <th>
                                        version
                                                                            </th>
                                    <td>
                                                                                    
                                                                                <p>$Id: HttpSession.php 1 2013-03-29 16:48:06Z huan.song $</p>
                                    </td>
                                </tr>
                                                                                                                <tr>
                                    <th>
                                        package
                                                                            </th>
                                    <td>
                                                                                    
                                                                                <p>tfc.ap</p>
                                    </td>
                                </tr>
                                                                                                                <tr>
                                    <th>
                                        since
                                                                            </th>
                                    <td>
                                                                                    1.0
                                                                                
                                    </td>
                                </tr>
                                                                                                                                                                                                                                    </table>

                    <h3><i class="icon-custom icon-method"></i> Methods</h3>
                                                                <a id="method___construct"></a>
                        <div class="element clickable method public  method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
                            <h2>构造方法：初始化用户自定义会话处理接口</h2>
                            <pre>__construct(\tfc\ap\interfaces\SessionSaveHandler|null $saveHandler = null) </pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$saveHandler</h4>
                                                <code><a href="../classes/tfc.ap.interfaces.SessionSaveHandler.html">\tfc\ap\interfaces\SessionSaveHandler</a>|null</code><p></p>
                                            </div>
                                                                            
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_open"></a>
                        <div class="element clickable method public  method_open" data-toggle="collapse" data-target=".method_open .collapse">
                            <h2>打开会话任务</h2>
                            <pre>open() : \tfc\ap\HttpSession</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    throws
                                                </th>
                                                <td>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果打开任务失败，抛出异常</p>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.ap.HttpSession.html">\tfc\ap\HttpSession</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_close"></a>
                        <div class="element clickable method public  method_close" data-toggle="collapse" data-target=".method_close .collapse">
                            <h2>关闭会话任务</h2>
                            <pre>close() : \tfc\ap\HttpSession</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.ap.HttpSession.html">\tfc\ap\HttpSession</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_destroy"></a>
                        <div class="element clickable method public  method_destroy" data-toggle="collapse" data-target=".method_destroy .collapse">
                            <h2>销毁所有的会话</h2>
                            <pre>destroy() : \tfc\ap\HttpSession</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.ap.HttpSession.html">\tfc\ap\HttpSession</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getIsStarted"></a>
                        <div class="element clickable method public  method_getIsStarted" data-toggle="collapse" data-target=".method_getIsStarted .collapse">
                            <h2>判断会话是否已经被打开</h2>
                            <pre>getIsStarted() : boolean</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>boolean</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getId"></a>
                        <div class="element clickable method public  method_getId" data-toggle="collapse" data-target=".method_getId .collapse">
                            <h2>获取会话ID</h2>
                            <pre>getId() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_setId"></a>
                        <div class="element clickable method public  method_setId" data-toggle="collapse" data-target=".method_setId .collapse">
                            <h2>设置会话ID</h2>
                            <pre>setId(string $value) : \tfc\ap\HttpSession</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    throws
                                                </th>
                                                <td>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果会话已经被打开，则只能通过session_regenerate_id()方式设置ID</p>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$value</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.ap.HttpSession.html">\tfc\ap\HttpSession</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_regenerateID"></a>
                        <div class="element clickable method public  method_regenerateID" data-toggle="collapse" data-target=".method_regenerateID .collapse">
                            <h2>重置会话ID</h2>
                            <pre>regenerateID(boolean $deleteOldSession = true) : \tfc\ap\HttpSession</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$deleteOldSession</h4>
                                                <code>boolean</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.ap.HttpSession.html">\tfc\ap\HttpSession</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getName"></a>
                        <div class="element clickable method public  method_getName" data-toggle="collapse" data-target=".method_getName .collapse">
                            <h2>获取会话名</h2>
                            <pre>getName() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_setName"></a>
                        <div class="element clickable method public  method_setName" data-toggle="collapse" data-target=".method_setName .collapse">
                            <h2>设置会话名</h2>
                            <pre>setName(string $value) : \tfc\ap\HttpSession</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    throws
                                                </th>
                                                <td>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果会话已经被打开，则不允许重新设置会话名</p>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果会话名中有英文字母和数字之外的字符，抛出异常</p>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$value</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.ap.HttpSession.html">\tfc\ap\HttpSession</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getSavePath"></a>
                        <div class="element clickable method public  method_getSavePath" data-toggle="collapse" data-target=".method_getSavePath .collapse">
                            <h2>获取会话保存路径</h2>
                            <pre>getSavePath() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_setSavePath"></a>
                        <div class="element clickable method public  method_setSavePath" data-toggle="collapse" data-target=".method_setSavePath .collapse">
                            <h2>设置会话保存路径</h2>
                            <pre>setSavePath(string $value) : \tfc\ap\HttpSession</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    throws
                                                </th>
                                                <td>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果会话已经被打开，则不允许重新设置会话保存路径</p>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果设置的目录地址不存在，抛出异常</p>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$value</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.ap.HttpSession.html">\tfc\ap\HttpSession</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getAutoStart"></a>
                        <div class="element clickable method public  method_getAutoStart" data-toggle="collapse" data-target=".method_getAutoStart .collapse">
                            <h2>判断Session是否会自动开启</h2>
                            <pre>getAutoStart() : boolean</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>boolean</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_toArray"></a>
                        <div class="element clickable method public  method_toArray" data-toggle="collapse" data-target=".method_toArray .collapse">
                            <h2>获取所有的会话</h2>
                            <pre>toArray() : array</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>array</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_count"></a>
                        <div class="element clickable method public  method_count" data-toggle="collapse" data-target=".method_count .collapse">
                            <h2>获取会话数据量</h2>
                            <pre>count() : integer</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>integer</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getKeys"></a>
                        <div class="element clickable method public  method_getKeys" data-toggle="collapse" data-target=".method_getKeys .collapse">
                            <h2>获取会话中所有的键</h2>
                            <pre>getKeys() : array</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>array</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_get"></a>
                        <div class="element clickable method public  method_get" data-toggle="collapse" data-target=".method_get .collapse">
                            <h2>通过会话键获取值，如果都找不到，返回默认值</h2>
                            <pre>get(mixed $key, mixed $defaultValue = null) : mixed</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$key</h4>
                                                <code>mixed</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$defaultValue</h4>
                                                <code>mixed</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code>mixed</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_add"></a>
                        <div class="element clickable method public  method_add" data-toggle="collapse" data-target=".method_add .collapse">
                            <h2>添加会话，如果键已经存在，替换老值</h2>
                            <pre>add(mixed $key, mixed $value) : \tfc\ap\HttpSession</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$key</h4>
                                                <code>mixed</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$value</h4>
                                                <code>mixed</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.ap.HttpSession.html">\tfc\ap\HttpSession</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_remove"></a>
                        <div class="element clickable method public  method_remove" data-toggle="collapse" data-target=".method_remove .collapse">
                            <h2>移除会话</h2>
                            <pre>remove(mixed $key) : mixed</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$key</h4>
                                                <code>mixed</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code>mixed</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_clear"></a>
                        <div class="element clickable method public  method_clear" data-toggle="collapse" data-target=".method_clear .collapse">
                            <h2>移除所有的会话</h2>
                            <pre>clear() : \tfc\ap\HttpSession</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.ap.HttpSession.html">\tfc\ap\HttpSession</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_has"></a>
                        <div class="element clickable method public  method_has" data-toggle="collapse" data-target=".method_has .collapse">
                            <h2>判断键在会话中是否存在</h2>
                            <pre>has(mixed $key) : boolean</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$key</h4>
                                                <code>mixed</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code>boolean</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getTimeout"></a>
                        <div class="element clickable method public  method_getTimeout" data-toggle="collapse" data-target=".method_getTimeout .collapse">
                            <h2>获取PHP INI中设置的SESSION过期时间，默认：1440s</h2>
                            <pre>getTimeout() : integer</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>integer</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_setTimeout"></a>
                        <div class="element clickable method public  method_setTimeout" data-toggle="collapse" data-target=".method_setTimeout .collapse">
                            <h2>设置PHP INI中的SESSION过期时间，默认：1440s</h2>
                            <pre>setTimeout(integer $maxLifeTime) : \tfc\ap\HttpSession</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$maxLifeTime</h4>
                                                <code>integer</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.ap.HttpSession.html">\tfc\ap\HttpSession</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_registerSaveHandler"></a>
                        <div class="element clickable method public  method_registerSaveHandler" data-toggle="collapse" data-target=".method_registerSaveHandler .collapse">
                            <h2>设置用户自定义会话处理接口</h2>
                            <pre>registerSaveHandler(\tfc\ap\interfaces\SessionSaveHandler $saveHandler) : void</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$saveHandler</h4>
                                                <code><a href="../classes/tfc.ap.interfaces.SessionSaveHandler.html">\tfc\ap\interfaces\SessionSaveHandler</a></code><p></p>
                                            </div>
                                                                            
                                                                    </div>
                            </div>
                        </div>
                    
                    
                                                        </div>
            </div>
            <a id="\tfc\ap\HttpSession"></a>
            <ul class="breadcrumb">
                <li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
                    
    
    <li><span class="divider">\</span><a href="../namespaces/tfc.ap.html">ap</a></li>

                <li class="active"><span class="divider">\</span><a href="../classes/tfc.ap.HttpSession.html">HttpSession</a></li>
            </ul>
        </div>
    </div>

    </div>

        <footer class="span12">
            Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
            <a href="http://glyphicons.com/">Glyphicons</a>.<br/>
            Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
            generated on Sat, 27 Dec 2014 06:16:38 +0000.<br/>
    </footer>
    </body>
</html>
